﻿namespace CST_276_Lab_3
{
    class StandardDeskAssembly : DeskAssembly
    {
        protected override Desk CreateDesk(string type)
        {
            Desk desk = null;
            IComponentFactory componentFactory = new StandardComponentFactory();

            switch (type)
            {
                case "Cherry":
                    desk = new CherryDesk(componentFactory) {Name = "Cherry standard desk"};
                    break;
                case "Oak":
                    desk = new OakDesk(componentFactory) {Name = "Oak standard desk"};
                    break;
                case "Metal":
                    desk = new MetalDesk(componentFactory) {Name = "Metal standard desk"};
                    break;
                case "Particleboard":
                    desk = new ParticleBoardDesk(componentFactory) {Name = "Particleboard standard desk"};
                    break;
            }

            return desk;
        }
    }
}
